﻿using Microsoft.Samples.Cloud.Data;
using WaveTech.GShield.Model;
using WaveTech.GShield.Repositories.Azure.Entities;

namespace WaveTech.GShield.Repositories.Azure
{
	public static class ModelToCloud
	{
		#region Get Game Rating
		public static SsdsEntity<CloudGameRating> GetGameRating(GameRating gameRating)
		{
			if (gameRating == null)
			{
				return null;
			}

			SsdsEntity<CloudGameRating> cloudGameRating = new SsdsEntity<CloudGameRating>()
			{
				Id = gameRating.GameRatingId.ToString(),
				Entity = new CloudGameRating()
				{
					Title = gameRating.Title,
					Publisher = gameRating.Publisher,
					FileName = gameRating.FileName,
					Directory = gameRating.Directory,
					ProductName = gameRating.ProductName,
					Rating = (int)gameRating.Rating
				}
			};

			return cloudGameRating;
		}
		#endregion Get Game Rating
	}
}
